package com.pan.hisystem.mapper;

import com.pan.hisystem.pojo.Drug;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author qingyang
 * @since 2022-03-18
 */
@Repository
public interface DrugMapper extends BaseMapper<Drug> {

    /**
     * 取药
     * @param ids
     * @return
     */
    int updateDrugs(@Param(value = "ids") Integer[] ids);



    /**
     * 根据名称、功效、类型获取药品
     * @param name
     * @param efficacy
     * @param type
     * @return
     */
    List<Drug> getDrugsByType(String name, String efficacy, String type);

    List<Drug> getDrugsByType(String efficacy, String type);
}
